<!--  @author:ymy  -->
<template>
  <div class="teach">
    <pro-title :title="title" />
    <div class="content">
      <div class="content-item" v-for="item in series" :key="item.id">
        <div class="item-img">
          <img :src="'https://ss.lanqb.com/' + item.posters.app" alt="" />
        </div>
        <div class="item-title">
          <span v-if="item.title.length >= 24">
            {{ item.title.slice(0, 24) }}<strong>…</strong>
          </span>
          <span v-else>{{ item.title }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import ProTitle from '../ProTitle';
export default {
  name: 'Teach',
  data() {
    return {
      title: '热门教程',
    };
  },
  components: {
    ProTitle,
  },
  props: ['series'],
};
</script>
<style lang="less" scoped>
.teach {
  margin-top: 0.1rem;
  margin-bottom: 0.175rem;
  height: 4rem;
  background-color: white;
  > .live-title {
    height: 0.34rem;
    line-height: 0.34rem;
    padding: 0px 0.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.01rem solid #e6e6e6;
    > h3 {
      font-size: 0.14rem;
      font-weight: normal;
    }
    > span {
      font-size: 0.12rem;
      color: #a4a4a4;
    }
  }
  > .content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0.11rem 0.055rem 0;
    > .content-item {
      width: 1.82rem;
      height: 1.775rem;
      text-align: center;
      > .item-img {
        img {
          width: 1.72rem;
          height: 1.29rem;
        }
      }
      > .item-title {
        span {
          display: inline-block;
          text-align: left;
          margin: 0.05rem 0;
          font-size: 0.12rem;
        }
      }
    }
  }
}
</style>
